package algorithm.graph.adjacencylist;

public class Edge {
    int from;
    int to;
    int data;

    public Edge(int from, int to, int data) {
        this.from = from;
        this.data = data;
        this.to = to;
    }

    public Edge(int from, int to) {
        this(from, to, 0);
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    public int getTo() {
        return to;
    }

    public int getFrom() {
        return from;
    }

}
